class BloggerData < ActiveRecord::Base
  belongs_to :blogger_crawl, :foreign_key => :crawl_id # foreign key - crawl_id
  
  def crawl
    blogger_crawl
  end
  
  def crawl=(new_crawl)
    blogger_crawl = new_crawl
  end
  
  @@trusts = {
    "books" => 0.9,
    "country" => 0.9,
    "email" => 0.9,
    "first_name" => 0.95,
    "full_name" => 0.95,
    "gender" => 0.9,
    "interests" => 0.9,
    "last_name" => 0.95,
    "last_update"  => 0.9,
    "locale_country" => 0.9,
    "locality" => 0.9,
    "movies"  => 0.9,
    "music"  => 0.9,
    "occupation"  => 0.9,
    "role"  => 0.9, 
    "state" => 0.9
  }
  
  def trust_of(field)
    raise Exception.new "#{self.class} must define trust for #{field}" if !@@trusts.key? field
    @@trusts[field]
  end
  
end
